package com.real8.plusplayground.client.statistics;

import com.google.gwt.editor.client.Editor;
import com.google.gwt.editor.client.SimpleBeanEditorDriver;
import com.google.gwt.user.client.ui.IsWidget;

public interface StatisticsView extends Editor<PersonStatistics>, IsWidget {
	/**
	 * The presenter for this view.
	 */
	public interface Presenter {
		/**
		 * Fired when new personId is entered by the user
		 */
		void onIdChange(String personId);
	}

	/**
	 * Set the {@link Presenter} for this view.
	 * 
	 * @param presenter
	 *            the presenter
	 */
	void setPresenter(Presenter presenter);

	/**
	 * Get the driver used to edit statistics in the view.
	 */
	SimpleBeanEditorDriver<PersonStatistics, ?> getEditorDriver();

	/**
	 * Set the id of the person
	 * 
	 * @param personId
	 */
	void setId(String personId);
}
